import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SGroup } from "../../../../../Message/Public/SGroup";
import { Cache } from "../../../cache/Cache";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class CopyGroupMiniInfoCommand
    
    export  class CopyGroupMiniInfoCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            super.call(arg1);
            var loc1=arg1.messageBase as SGroup;
            var loc2=Cache.instance.copy.groupInfo;
            Cache.instance.copy.groupInfo = loc1;
            if (loc2) 
            {
                Cache.instance.copy.groupInfo.players = loc2.players;
            }
            NetDispatcher.dispatchCmd(ServerCommand.Copy_GroupsInfoChange, Cache.instance.copy.players);
            return;
        }
    }
